[code sync] Merge code from sonic-net/sonic-platform-common:202505 to 202506#104
Merged
mssonicbld merged 3 commits intoAzure:202506from Aug 9, 2025
Merged
Conversation
Collaborator
mssonicbld
commented
Aug 9, 2025
…(#593) <!-- Provide a general summary of your changes in the Title above --> #### Description <!-- Describe your changes in detail --> This PR updates the `get_transceiver_info()` API in the CMIS module to remove fields from the returned `XCVR_INFO` dictionary that are dependent on the active application ID. These fields include: - host_electrical_interface - media_interface_code - host_lane_assignment_option - media_lane_assignment_option #### Motivation and Context <!-- Why is this change required? What problem does it solve? If this pull request closes/resolves an open Issue, make sure you include the text "fixes #xxxx", "closes #xxxx" or "resolves #xxxx" here --> These fields are only meaningful when the active application ID is explicitly shown. Including them without context can lead to confusion or misinterpretation of transceiver capabilities. This change ensures the API response reflects only valid and context-aware data. #### How Has This Been Tested? <!-- Please describe in detail how you tested your changes. Include details of your testing environment, and the tests you ran to see how your change affects other areas of the code, etc. --> Please refer to the test section of sonic-net/sonic-utilities#4020 #### Additional Information (Optional) MSFT ADO - 34325583
…atMemMap (#592)
<!-- Provide a general summary of your changes in the Title above -->
#### Description
<!--
Describe your changes in detail
-->
On the custom backplane cartridge cable, following error is periodically seen in syslog as part of DOM monitoring.
```
2025 Aug 7 16:26:43.826059 dut WARNING pmon#DomInfoUpdateTask[34]: Got exception KeyError('ModuleFlagByte1') while processing dom flags for port Ethernet464, ignored
```
#### Motivation and Context
<!--
Why is this change required? What problem does it solve?
If this pull request closes/resolves an open Issue, make sure you
include the text "fixes #xxxx", "closes #xxxx" or "resolves #xxxx" here
-->
The traceback is seen since some registers which are on page 0 are still defined in `CmisMemMap` instead of `CmisFlatMemMap`. This causes the KeyError to be seen since the backplane cartridge has a memory map as an instance of `CmisFlatMemMap`.
(https://github.com/sonic-net/sonic-platform-common/blob/af47c73007206a9e3c7b37680ec69dfb59877d30/sonic_platform_base/sonic_xcvr/mem_maps/amphenol/backplane.py#L13)
Hence, moving all registers which access page 0 to `CmisFlatMemMap` class.
#### How Has This Been Tested?
<!--
Please describe in detail how you tested your changes.
Include details of your testing environment, and the tests you ran to
see how your change affects other areas of the code, etc.
-->
Verified that the error is not seen in syslog anymore.
#### Additional Information (Optional)
MSFT ADO - 34346395
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.